package com.beta.service;

import com.baomidou.framework.service.ISuperService;
import com.beta.dto.pay.PaymentDto;
import com.beta.em.pay.PayRoutes;
import com.beta.entity.Payments;

import java.math.BigDecimal;

/**
 *
 * Payments 表数据服务层接口
 *
 */
public interface IPaymentsService extends ISuperService<Payments> {

    PaymentDto executePayOrder(Integer userId, Integer orderId, PayRoutes payRoutes, String clientIp);

    /**
     * 获得订单支付信息
     * @param orderId
     * @return
     */
    Payments getPaymentByOrderId(Integer orderId);

    /**
     * 计算订单的支付手续费
     * @param orderId
     * @return
     */
    BigDecimal getPaymentFeeRatioByOrderId(Integer orderId);

    /**
     * 获得订单的交易手续费（第三方支付平台扣除的金额）
     * @param orderId
     * @return
     */
    BigDecimal getPaymentFeeByOrderId(Integer orderId);

}